package com.jz.netthings.analysis.bean;

import lombok.Data;

/**
 * 浆员类型
 */
public enum ProviderType {

    /**
     * 所有浆员
     */
    ALL_PROVIDER("ALL_PROVIDER", "所有浆员"),
    /**
     * 今年已进站浆员
     */
    THIS_YEAR_COMED("THIS_YEAR_COMED", "今年已进站浆员"),
    ZC_PROVIDER("ZC_PROVIDER", "忠诚浆员"), FS_PROVIDER("FS_PROVIDER", "复苏浆员"),
    NEW_PROVIDER("NEW_PROVIDER", "今年新浆员"), NOT_LINK_PROVIDER("NOT_LINK_PROVIDER", "未被链接浆员"),
    THIS_YEAR_NOT_COMED("THIS_YEAR_NOT_COMED", "今年未进站浆员"), XM_PROVIDER("XM_PROVIDER", "休眠浆员"),
    LINKED_XM_PROVIDER("LINKED_XM_PROVIDER", "已链接的休眠浆员"), LS_PROVIDER("LS_PROVIDER", "流失浆员"),
    NOT_LINKED_XM_PROVIDER("NOT_LINKED_XM_PROVIDER", "未链接的休眠浆员");

    /**
     * 类型值
     */
    private String value;
    /**
     * 描述
     */
    private String desc;

    ProviderType(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static ProviderType getByValue(String value){
        if (value.equals(ProviderType.ALL_PROVIDER.getValue())){
            return ProviderType.ALL_PROVIDER;
        }else if (value.equals(ProviderType.THIS_YEAR_COMED.getValue())){
            return ProviderType.THIS_YEAR_COMED;
        }else if (value.equals(ProviderType.ZC_PROVIDER.getValue())){
            return ProviderType.ZC_PROVIDER;
        }else if (value.equals(ProviderType.FS_PROVIDER.getValue())){
            return ProviderType.FS_PROVIDER;
        }else if (value.equals(ProviderType.NEW_PROVIDER.getValue())){
            return ProviderType.NEW_PROVIDER;
        }else if (value.equals(ProviderType.NOT_LINK_PROVIDER.getValue())){
            return ProviderType.NOT_LINK_PROVIDER;
        }else if (value.equals(ProviderType.THIS_YEAR_NOT_COMED.getValue())){
            return ProviderType.THIS_YEAR_NOT_COMED;
        }else if (value.equals(ProviderType.XM_PROVIDER.getValue())){
            return ProviderType.XM_PROVIDER;
        }else if (value.equals(ProviderType.LINKED_XM_PROVIDER.getValue())){
            return ProviderType.LINKED_XM_PROVIDER;
        }else if (value.equals(ProviderType.LS_PROVIDER.getValue())){
            return ProviderType.LS_PROVIDER;
        }else if (value.equals(ProviderType.NOT_LINKED_XM_PROVIDER.getValue())){
            return ProviderType.NOT_LINKED_XM_PROVIDER;
        }else {
            return ProviderType.ALL_PROVIDER;
        }
    }

}
